﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'GetNotaIngresaByFacturaID')
	BEGIN
		DROP  Procedure  GetNotaIngresaByFacturaID
	END

GO

CREATE Procedure GetNotaIngresaByFacturaID

	(
		@idFactura int 
	)


AS
begin
SELECT
	[notaIngreso].[Descripcion] AS 'Descripcion',
	[notaIngreso].[Estado] AS 'Estado',
	[notaIngreso].[FechaIngreso] AS 'FechaIngreso',
	[notaIngreso].[IdEmpleado] AS 'IdEmpleado',
	[notaIngreso].[IdFactura] AS 'IdFactura',
	[notaIngreso].[IdNotaIngreso] AS 'IdNotaIngreso'
FROM [dbo].[NotaIngreso] [notaIngreso]
where [notaIngreso].[IdFactura]=@idFactura
end

GO


GRANT EXEC ON GetNotaIngresaByFacturaID TO PUBLIC

GO


